window.Vue = require('vue').default;
import axios from "axios";
import VueAxios from 'vue-axios'
import VueRouter from "vue-router";

import Missions from "./components/pages/Missions";
import Index from "./components/pages/Index";

require('element-ui');

Vue.use(VueAxios, axios)
Vue.use(VueRouter)

window.API_URL = 'https://api.2015wuji01.net';
// const files = require.context('./', true, /\.vue$/i)
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))


window.router = new VueRouter({
    routes: [
        {
            component: Index,
            path: '/',
            name: 'index',
        },
        {
            component: Missions,
            path: '/missions',
            name: 'missions',
        }
    ],
    mode: 'history'
})